<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <title>AAAAAAAAAAAAAAAA</title>  <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon" />
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="stylesheet" href="https://static.9hive.cn/global/css/bootstrap-extend.min.css?v2.2.0">
    <link rel="stylesheet" href="https://static.9hive.cn/global/vendor/bootstrap-3.3.7/bootstrap.min.css">
    <link rel="stylesheet" href="https://static.9hive.cn/global/vendor/bootstrap-table-1.11/bootstrap-table.min.css?v=1.1">
    <link rel="stylesheet" href="https://static.9hive.cn/global/vendor/bootstrap-select/bootstrap-select.min.css?v2.2.0">
    <link rel="stylesheet" href="https://static.9hive.cn/mmenu/assets/css/site.min.css?v2.2.0">
    <link rel="stylesheet" href="https://static.9hive.cn/global/fonts/font-awesome/font-awesome.min.css">
    <link href="https://static.9hive.cn/global/vendor/icheck/icheck.min.css" rel="stylesheet">
    <link href="https://static.9hive.cn/global/vendor/icheck/skins/flat/blue.css" rel="stylesheet">
    <link rel="stylesheet" href="https://static.9hive.cn/global/vendor/nprogress/nprogress.min.css">
    <link rel="stylesheet" href="https://static.9hive.cn/global/vendor/multi-select/multi-select.min.css?v2.2.0">
    <link rel="stylesheet" href="https://static.9hive.cn/global/vendor/inside/inside.css?v=1">
    <link rel="stylesheet" href="https://static.9hive.cn/global/vendor/common/common_20170925.css">
    <link rel="stylesheet" href="https://static.9hive.cn/global/vendor/file/file.css" >
    <link rel="stylesheet" href="https://static.9hive.cn/global/iconhive/hiveicon.css">

</head>
<body>
<div class="ibox">
    <div class="ibox-title">
        <div class="pull-left mbx navbar_title">
            <span class="current">品牌用户</span>
            <span class="line">/</span>
            短信管理
        </div>

    </div>
    <div class="ibox-content">
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="col-sm-12" >
                    <div class="row m-b-sm m-t-sm">
                        <div class="flexed margin-vertical-24_20">
                            <button class="hive-btn  hive-btn-primary margin-left-8" id="addclerk">
                                <i class="icon-add" aria-hidden="true"></i>群发
                            </button>


                           <!-- <button class="hive-btn  hive-btn-primary margin-left-8" id="importClerk">
                                <i class="icon-add" aria-hidden="true"></i>导入
                            </button>-->
                        </div>

                       <!-- <div class="col-sm-2 active_status" style="width: 135px;padding-left: 0px;padding-right: 8px">
                            <select class="form-control light-input light-input cursor_pointer" aria-invalid="false">
                                <option value="">发送状态</option>
                                <option value="0">成功</option>
                                <option value="1">失败</option>
                            </select>
                        </div>-->
                        <!--<div class="col-sm-2" style="width: 185px;padding-left: 0px;padding-right: 8px">
                            <input type="text" id="phone" value="" placeholder="手机号码" class="form-control light-input" maxlength="25"  data-rule-required="true">
                        </div>
                        <div class="col-sm-2" style="width: 185px;padding-left: 0px;padding-right: 8px">
                            <input type="text" id="name" value="" placeholder="姓名" class="form-control light-input" maxlength="25"  data-rule-required="true">
                        </div>
                        <div class="col-sm-2 seek" >
                            <button class="hive-btn search" type="button">搜索</button>
                        </div>-->
                    </div>
                    <table class="table-striped table-no-bordered fixed-table-container table-row-border-color table-hovered table-hover" id="cpTableEvents"  data-toggle="table" data-mobile-responsive="true">
                        <thead>
                        <tr>
                            <th data-field="content" data-sortable="true">发送内容</th>
                            <th data-field="name">姓名</th>
                            <th data-field="phone" data-sortable="true">手机</th>
                            <!--<th data-field="credit" data-sortable="true">积分</th>-->
                            <!--<th data-field="jac_status" data-sortable="true" data-formatter="jacFormatter">jac权限</th>-->
                           <!-- <th data-field="status" data-formatter="activeFormatter">发送状态</th>-->
                            <th data-field="createt_time" data-sortable="true">创建日期</th>
                            <th data-field="head" data-formatter="opFormatter" data-halign="center" data-width="120"  data-align="center">操作</th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>


<script src="https://static.9hive.cn/global/vendor/jquery/jquery-2.1.4.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/bootstrap-3.3.7/bootstrap.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/bootstrap-table-1.11/bootstrap-table.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/bootstrap-export/bootstrap-export.js"></script>
<script src="https://static.9hive.cn/global/vendor/bootstrap-table-1.11/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/jquery-export/jquery-export.js"></script>
<script src="https://static.9hive.cn/global/vendor/bootstrap-select/bootstrap-select.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/multi-select/jquery.multi-select.js"></script>
<script src="https://static.9hive.cn/global/js/core.min.js"></script>
<script src="https://static.9hive.cn/mmenu/assets/js/site.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/layer/layer.js"></script>
<script src="https://static.9hive.cn/global/vendor/icheck/icheck.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/nprogress/nprogress.js"></script>
<script src="https://static.9hive.cn/global/vendor/layer/laydate/laydate.js"></script>
<script src="https://static.9hive.cn/global/vendor/jquery-validate/jquery.validate.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/jquery-validate/additional-methods.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/jquery-validate/localization/messages_zh.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/jquery-ajaxform/ajax-form.js"></script>
<script src="https://static.9hive.cn/global/vendor/inside/inside20170925.js"></script>
<script type="text/javascript" src="https://static.9hive.cn/global/vendor/file/uploadify/ajaxfileupload.js" ></script>
<script type="text/javascript">
    var uploadUrl = "/card/file/uploadfile?shopId=4da05513b44a4762849c3fe32f792aa8&type=d";
    var browserUrl = "/card/file/browser?shopId=4da05513b44a4762849c3fe32f792aa8";
</script>
<script src="https://static.9hive.cn/global/vendor/file/file.js"></script>
<script>
    var data = {data: {}};
    $(function() {
        $.ajax({
            type : "POST",
            url: "/mall/admin/SmsController/getListData",
            data:{},
            success : function(data) {
                data.data = data;
                console.log(data);
                   // parent.layer.msg(str+"成功", {icon: 1});
                    refresh_table();
            },
        })
    });
    function opFormatter(value, row, index){
        //html += '<a href="javascript:void(0)" onclick="del(\'' + row.id + '\');" data-toggle="tooltip" data-placement="top" title="删除" class="icon-delete hive_icon color_danger"  ></a>';
        html =  '<a href="javascript:void(0)" onclick="del(\'' + row.id + '\');" data-toggle="tooltip" data-placement="top" title="" class="color_danger hive_icon icon-delete" data-original-title="删除"></a>';
        html += '<a href="javascript:void(0)" onclick="active_statusUpdate(\''+row.id+'\',\''+row.active_status+'\');">';

      /*  if(row.active_status=="0"){
            html += '<a href="javascript:void(0)" onclick="active_statusUpdate(\''+row.id+'\',\''+row.active_status+'\');" data-toggle="tooltip" data-placement="top" title="" class="color_success  hive_icon icon-start" data-original-title="激活"></a>';
        }else{
            html += '<a href="javascript:void(0)" onclick="active_statusUpdate(\''+row.id+'\',\''+row.active_status+'\');" data-toggle="tooltip" data-placement="top" title="" class="color_success  hive_icon icon-pause" data-original-title="禁用"></a>';
        }*/
        return html;
    }
    $(document).on("click",".seek",function () {
        var active_status=$(".active_status select").val();
        var jac_status=$(".jac_status select").val();
        var phone=$("#phone").val();
        var name=$("#name").val();
        data.active_status=active_status;
        data.jac_status=jac_status;
        data.phone=phone;
        data.name=name;
        refresh_table();
    });
    function refresh_table() {
        $('#cpTableEvents').bootstrapTable('refresh',{query:data});
    }
  /*  function jacFormatter(v) {
        var jac_status="";
        if(v=="0"){
            jac_status="未开通";
        }else if(v=="1"){
            jac_status="已开通";
        }
        return jac_status;
    }*/
   /* function activeFormatter(v) {
        var active_status="";
        if(v=="0"){
            active_status="发送失败";
        }else if(v=="1"){
            active_status="发送成功";
        }
        return active_status;
    }*/
   /* function del(v) {
        G.ui.tips.confirm_back('确定要删除吗？', '/mall/admin/SmsController/delete',{"ids":v},refresh_table);
    }*/

    function del(v) {

        parent.layer.confirm('您确定要删除吗？', {
            btn: ['是', '否'] //按钮
        }, function () {
            $.post('delete', {"ids": v}, function (e) {
                if (e.status == 'error') {
                    parent.layer.msg(e.message)
                } else {
                    parent.layer.msg('删除成功');
                    refresh_table();
                  //  $('#table').bootstrapTable('refresh');
                }
            })
        });


    }






    (function() {
        $('#cpTableEvents').bootstrapTable({
            url: "/mall/admin/SmsController/getListData",
            // search: true,
            pagination: true,
            // showRefresh: true,
            // showExport:true,
            // showColumns: true,
            iconSize: 'outline',
            toolbar: '#eventsToolbar',
            formatNoMatches: function () {     var imghtml = '<div class="flexed_column content_center content_alignCenter padding-20"><img src="https://static.9hive.cn/global/img/nodata.png" class="no_data"/><span class="font-size-16">暂无数据</span></div>';     return imghtml; },
            formatLoadingMessage: function () {  //数据加载中样式
                return ' <div id="loading"><div id="loading-center">' +
                    '<div id="loading-center-absolute"><div class="object" id="object_one">' +
                    '</div><div class="object" id="object_two"></div><div class="object" id="object_three">' +
                    '</div><div class="object" id="object_four"></div></div></div>努力加载中...</div>'
            },
            icons: {
                refresh: 'icon-refresh',
                toggle: 'glyphicon-list-alt',
                columns: 'icon-select',
                export: 'icon-export'
            },
        });


        $('#importClerk').on('click',function (e) {
            parent.layer.open({
                shade: [0.3, '#fff'],
                type: 2,
                move: false,
                resize: false,
                title: '批量导入店员',
                content:"/card/admin/clerk/childImportClerk",
                area: ['420px', '300px'],
                btn: ['上传文件', '取消'],
                btnAlign: 'c',
                scrollbar: false,
                success: function (layero, index) {
                    childBody = parent.layer.getChildFrame('body', index);
                },
                yes: function () {
                    childBody.find('#button').click();
                },
                btn2: function () {
                    parent.layer.closeAll();
                }
            });
        })
        $('#addclerk').on('click',function (e) {
            location.href = 'addclerk';

        })
        $(".wrapper").tooltip({selector:"[data-toggle=tooltip]",container:"body"});
    })();
</script>
</body>
</html>
<style>
    .add{
        float: left;
        height: auto;
        margin-left: 1.2%;
    }
    .status{
        width: 13%;
    }
    .time{
        width: 20%;
    }
</style>